using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._TurnFeatureClass
{
    /// <summary>
    /// <para>Create Turn Feature Class</para>
    /// <para>Creates a new turn feature class to store turn features that model turning movements in a network dataset.</para>
    /// <para>创建一个新的转弯要素类，用于存储在网络数据集中对转弯运动进行建模的转弯要素。</para>
    /// </summary>    
    [DisplayName("Create Turn Feature Class")]
    public class CreateTurnFeatureClass : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateTurnFeatureClass()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_location">
        /// <para>Output Location</para>
        /// <para>The file, workgroup, or enterprise geodatabase, or the folder in which the output turn feature class will be created. The workspace must already exist.</para>
        /// <para>文件、工作组或企业级地理数据库，或者将在其中创建输出转弯要素类的文件夹。工作区必须已存在。</para>
        /// </param>
        /// <param name="_out_feature_class_name">
        /// <para>Output Turn Feature Class Name</para>
        /// <para>The name of the turn feature class to be created.</para>
        /// <para>要创建的转弯要素类的名称。</para>
        /// </param>
        public CreateTurnFeatureClass(object _out_location, object _out_feature_class_name)
        {
            this._out_location = _out_location;
            this._out_feature_class_name = _out_feature_class_name;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Create Turn Feature Class";

        public override string CallName => "na.CreateTurnFeatureClass";

        public override List<string> AcceptEnvironments => ["configKeyword", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_out_location, _out_feature_class_name, _maximum_edges, _in_network_dataset, _in_template_feature_class, _spatial_reference, _config_keyword, _spatial_grid_1, _spatial_grid_2, _spatial_grid_3, _has_z.GetGPValue(), _out_turn_features];

        /// <summary>
        /// <para>Output Location</para>
        /// <para>The file, workgroup, or enterprise geodatabase, or the folder in which the output turn feature class will be created. The workspace must already exist.</para>
        /// <para>文件、工作组或企业级地理数据库，或者将在其中创建输出转弯要素类的文件夹。工作区必须已存在。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_location { get; set; }


        /// <summary>
        /// <para>Output Turn Feature Class Name</para>
        /// <para>The name of the turn feature class to be created.</para>
        /// <para>要创建的转弯要素类的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Turn Feature Class Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class_name { get; set; }


        /// <summary>
        /// <para>Maximum Edges</para>
        /// <para>The maximum number of edges that turns in the new turn feature class can model. The default value is 5. The maximum value is 50.</para>
        /// <para>新转弯要素类中可转弯的最大边数。默认值为 5。最大值为 50。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Edges")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _maximum_edges { get; set; } = 5;


        /// <summary>
        /// <para>Input Network Dataset</para>
        /// <para>The network dataset in which the turn feature class will participate. The resulting turn feature class will be added as a turn source to the network dataset. If no network dataset is specified, the turn feature class will be created as not participating in a network dataset.</para>
        /// <para>转弯要素类将参与的网络数据集。生成的转弯要素类将作为转弯源添加到网络数据集中。如果未指定网络数据集，则转弯要素类将创建为未参与网络数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_network_dataset { get; set; } = null;


        /// <summary>
        /// <para>Template Feature Class</para>
        /// <para><xdoc>
        ///   <para>The feature class used as a template to define the attribute schema of the new turn feature class.</para>
        ///   <para>If the template feature class has the following fields, they are not created on the output turn feature class; NODE_, NODE#, JUNCTION, F_EDGE, T_EDGE, F-EDGE, T-EDGE, ARC1_, ARC2_, ARC1#, ARC2#, ARC1-ID, ARC2-ID, AZIMUTH, ANGLE.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用作模板的要素类，用于定义新转弯要素类的属性方案。</para>
        ///   <para>如果模板要素类具有以下字段，则不会在输出转弯要素类上创建这些字段;NODE_、NODE#、JUNCTION、F_EDGE、T_EDGE、F 边、T 边、ARC1_、ARC2_、ARC1#、ARC2#、ARC1-ID、ARC2-ID、方位角、角度。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Template Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_template_feature_class { get; set; } = null;


        /// <summary>
        /// <para>Spatial Reference</para>
        /// <para>The spatial reference to be applied to the output turn feature class. This parameter is ignored if the output location is a geodatabase feature dataset, as the output turn feature class will inherit the spatial reference of the feature dataset.</para>
        /// <para>要应用于输出转弯要素类的空间参考。如果输出位置是地理数据库要素数据集，则忽略此参数，因为输出转弯要素类将继承要素数据集的空间参考。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Spatial Reference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _spatial_reference { get; set; } = null;


        /// <summary>
        /// <para>Configuration Keyword</para>
        /// <para>Specifies the configuration keyword that determines the storage parameters of the new turn feature class. This parameter is used only if the output location is an workgroup or enterprise geodatabase</para>
        /// <para>指定用于确定新转弯要素类的存储参数的配置关键字。仅当输出位置为工作组或企业级地理数据库时，才使用此参数</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Configuration Keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _config_keyword { get; set; } = null;


        /// <summary>
        /// <para>Output Spatial Grid 1</para>
        /// <para>This parameter has been deprecated in ArcGIS Pro. Any value you enter is ignored.</para>
        /// <para>此参数在 ArcGIS Pro 中已弃用。您输入的任何值都将被忽略。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Spatial Grid 1")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _spatial_grid_1 { get; set; } = 1000;


        /// <summary>
        /// <para>Output Spatial Grid 2</para>
        /// <para>This parameter has been deprecated in ArcGIS Pro. Any value you enter is ignored.</para>
        /// <para>此参数在 ArcGIS Pro 中已弃用。您输入的任何值都将被忽略。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Spatial Grid 2")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _spatial_grid_2 { get; set; } = 0;


        /// <summary>
        /// <para>Output Spatial Grid 3</para>
        /// <para>This parameter has been deprecated in ArcGIS Pro. Any value you enter is ignored.</para>
        /// <para>此参数在 ArcGIS Pro 中已弃用。您输入的任何值都将被忽略。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Spatial Grid 3")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _spatial_grid_3 { get; set; } = 0;


        /// <summary>
        /// <para>Has Z</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Checked—The coordinates in the new turn feature class will have elevation (Z) values. This parameter is automatically checked and disabled if the input network dataset is specified and it supports connectivity based on z coordinate values of the network sources.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The coordinates in the new turn feature class will not have elevation (Z) values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>选中 - 新转弯要素类中的坐标将具有高程 （Z） 值。如果指定了输入网络数据集，并且支持基于网络源的 z 坐标值的连通性，则会自动选中并禁用此参数。</bullet_item><para/>
        ///     <bullet_item>未选中 - 新转弯要素类中的坐标将不具有高程 （Z） 值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Has Z")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _has_z_value _has_z { get; set; } = _has_z_value._false;

        public enum _has_z_value
        {
            /// <summary>
            /// <para>ENABLED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ENABLED")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DISABLED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DISABLED")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Turn Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Turn Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_turn_features { get; set; }


        public CreateTurnFeatureClass SetEnv(object configKeyword = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}